package com.kr.start.controller;

import com.kr.start.service.Demo.TestThread;
import com.kr.start.service.Demo.ttService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller 
@ResponseBody
@RequestMapping("/test")
public class TestController {
    

    @Autowired
    ttService _ttService;


    
    @ResponseBody
    @GetMapping(value = "/t1")
    public String test1() throws InterruptedException {
        
        TestThread t1 = new TestThread("t1",_ttService);
        TestThread t2 = new TestThread("t2",_ttService);
        TestThread t3 = new TestThread("t3",_ttService);
        TestThread t4 = new TestThread("t4",_ttService);
        t1.start();
        t2.start();
        t3.start();
        t4.start();
        return "test1";
    }
}